<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<!--/*@thymesVar id="order" type="com.treasure.mall.biz.entity.order.SubOrderPO"*/-->
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<ul class="nav nav-tabs" th:fragment="orderDetailTab(tabIndex)">
    <li th:class="${tabIndex==0?'active':''}" class="active">
        <a th:href="@{/order/detail(orderId=${order.subOrderId})}" href="order_detail.html">基本信息</a>
    </li>
    <li th:class="${tabIndex==1?'active':''}">
        <a th:href="@{/order/detail/payments(orderId=${order.subOrderId})}" href="order_detail.html">收退款记录</a>
    </li>
    <li th:class="${tabIndex==2?'active':''}">
        <a th:href="@{/order/detail/deliver(orderId=${order.subOrderId})}" href="order_detail.html">发货记录</a>
    </li>
    <!--    <li sec:authorize="hasRole('ADMIN')" th:class="${tabIndex==3?'active':''}">-->
    <!--        <a th:href="@{/order/detail/rebates(orderId=${order.subOrderId})}" href="order_detail.html">返利记录</a>-->
    <!--    </li>-->
</ul>

<div th:fragment="orderDetailCopy" class="animated fadeInRight"
     style="padding:0 6px;position:fixed;width:100%;top: 0;z-index:101;">
    <input type="hidden" id="hdSubOrderId" th:value="${order.subOrderId}"/>
    <div class="col-lg-12">
        <div class="ibox float-e-margins" style="margin-bottom:0;">
            <div class="ibox-title" style="padding: 14px 15px 11px;">
                <div class="form-inline">
                    <div class="form-group m-r-sm">
                        <label style="font-size: 17px; margin-top: 5px;">
                            订单-<span th:text="${order.subOrderId}">20170110095434456651</span>

                            <span style="font-size: 13px;">
                                <th:block th:if="${order.status.code==0}">
                                    <span class="color-primary" th:text="${order.orderPO.payStatus.desc}"
                                          th:class="${order.orderPO.payStatus.statusClass()}">已支付</span>
                                    <span class="color-warning" th:text="${order.deliverStatus.desc}"
                                          th:class="${order.deliverStatus.statusClass()}">待发货</span>
                                </th:block>
                                  <th:block th:if="${order.status.code!=0&&order.status.code!=3}">
                                                <span class="color-danger"
                                                      th:text="${order.status.desc}">已取消</span>
                                            </th:block>
                                <th:block th:if="${order.status.code==3}">
                                    <span class="color-primary">交易完成</span>
                                </th:block>
                                <th:block th:if="${order.isAfterSale()}">
                                    <span class="color-danger">售后申请中</span>
                                </th:block>
                            </span>
                        </label>
                    </div>
                    <div class="form-group m-r-sm" style="float: right; ">
                        <button th:if="${order.enableDeliver()}" type="button"
                                onclick="deliver()" class="btn btn-primary btn-sm">
                            发货
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        function deliver() {
            hot.iframeModal(deliverUri + "?orderId=" + $("#hdSubOrderId").val(), "900px", "500px", '订单发货');
        }
    </script>
</div>
</body>
</html>